home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
newsgrp
/
group95b.txt
/
000025_icon-group-sender _Wed May 24 11:58:00 1995.msg
< prev
next >
Wrap
Internet Message Format
|
1995-09-18
|
4KB
Received: by cheltenham.cs.arizona.edu; Wed, 24 May 1995 11:02:29 MST
Message-Id: <9505241158.AA04986@ns1.computek.net>
Mime-Version: 1.0
Content-Length: 3128
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
Date: Wed, 24 May 95 11:58 CDT
From: gep2@computek.net
Subject: Re: icon notes [Re: Is there such a language...]
To: icon-group@cs.arizona.edu
X-Mailer: SPRY Mail Version: 04.00.06.14
Errors-To: icon-group-errors@cs.arizona.edu
>+Actually, for everyday programming tasks, I personally still prefer SNOBOL4+
to Icon. I just think it's easier to use, unless I need character sets or
combinatorial things or some of the other special features of Icon.
>Tell us more. I find Icon fascinating, but it is so intricate
in some ways and so different that it would take me a _long_
time of stumbling in the dark to learn how to use it
effectively.
Well, you don't HAVE to use all the intricate things in ICON. Most people, I'd
expect, start programming ICON in much the same way they would program in C, and
then sort of "grow into" its special higher-level features and paradigms as they
get more comfortable in the language. The ICON book is a pretty good
introduction to the language, I think.
>I'd consider paying anyone who could show me tricks, techniques, tips. After
all, there aren't hundreds of books on this fascinating language, and I'm not a
big one to reinvent the wheel.
If you're interested in SNOBOL4, there's a WONDERFUL book showing you just
exactly that for the SNOBOL4 language. It's called "Algorithms in SNOBOL4"
written by Gimpel (the same Gimpel who's responsible for C-Lint) and is
available from Catspaw, Inc. in Salida, Colorado (the people who did SNOBOL4+
and now their newer Spitbol products). The book is only about $20 I think, and
it's a -terrific- buy for the money.
>So share with us details, case studies, tips, tricks if you like; many of us
lurkers would like to see this sort of thing.
That book is a far more wonderful collection of tricks and tips than anything I
could ever hope to post here. And of course, there's the other side: once you
are somewhat familiar with the language, "tips and tricks" are so UNhidden and
so obvious that I suspect most of us don't think it's particularly worth sharing
something so obvious. But I think it's fair to say that all of us who use and
love either ICON or SNOBOL4 have had so often the exhilaration of seeing an
otherwise complex problem solved, simply and elegantly, that it explains the
almost religious reverence that we have for these marvelous languages.
>In particular, how is Snobol preferable to Icon for some tasks?
Well, for example, SNOBOL4 supports two extraordinarily interesting functions:
eval(), which evaluates expressions, possibly containing symbols; and code(),
which converts an arbitrarily long character string containing SNOBOL4 source
code (even containing labels if you like, which you can reference externally) to
compiled object code (which you can later execute as often and as many times as
you like). These are NOT preprocessor functions: they are available at
runtime. There is no equivalent capability in ICON.
The other major thing is that I personally find SNOBOL4's pattern matching to be
simpler and more intuitive (although admittedly ultimately less powerful) than
ICON's string scanning.
Of course, ICON also has a LOT of things that SNOBOL4 doesn't have... as with so
many other things in life, there are always tradeoffs.
Gordon Peterson
http://www.computek.net/public/gep2